home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Menus / High Level / MenuSection.cp < prev    next >
Encoding:
Text File  |  1997-06-28  |  465 b   |  22 lines  |  [TEXT/CWIE]

  1. // MenuSection.cp
  2.  
  3. #ifndef MenuSection_h
  4. #include "MenuSection.h"
  5. #endif
  6.  
  7. MenuSection::MenuSection( Menu& theMenu, uint16 length )
  8.   : menu( theMenu ),
  9.      firstItem( theMenu.NextItem() ),
  10.      maxLength( length )
  11.   {
  12.     theMenu.AddFixedSection( *this, length );
  13.   }
  14.  
  15. MenuSection::MenuSection( Menu& theMenu, Extensible )
  16.   : menu( theMenu ),
  17.      firstItem( theMenu.NextItem() ),
  18.      maxLength( maxuint16 - theMenu.NextItem() )
  19.   {
  20.     theMenu.AddExtensibleSection( *this );
  21.   }
  22.